<%@ page import="com.devicemantra.coordinate.dataobjects.*,java.util.*,com.google.appengine.api.datastore.KeyFactory" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<link rel="stylesheet" type="text/css" href="/css/tab.css" />
</head>
<body>
<ul id="tabmenu">
	<li><a href="/AdminController?id=country">Country</a></li>

	<li><a  class="active" href="/AdminController?id=states">States</a></li>
	<li><a  href="/AdminController?id=department">Department</a></li>
	<li><a href="/AdminController?id=users">Users</a></li>
</ul>



<%
out.println("<form name=\"add_state\" action=\"/AddState\" method=\"POST\">");

		List<CState> lListOfStates = (List<CState>)request.getAttribute("STATE_LIST");
		Iterator<CState> lStateIter = lListOfStates.iterator();
		out.print("<br><br><br><TABLE BORDER=0 COLOR=00FF00>");
		
		if(lListOfStates.size()  > 0)
		{
			
		}
			
		int counter = 3;
		while( lStateIter.hasNext())
		{
			 if( (counter % 3 ) == 0) 
			 {
				 	out.print("<TR>");
				 	
			 }
				 counter++;
				 CState lState = lStateIter.next();
				 out.print("<TD> <A value=\"" + lState.getName() + "\"" +  " id=\"" + lState.getName() + "\"" + " href=\"\"" + ">" + lState.getName() + "</A>" + "<IMG SRC=\"icons/building.png\">" + " </TD>");
				 
				 if( (counter % 3 ) == 0)
				 {
				 	out.print("</TR>");
				 }
				 
		}
			out.print("</TABLE>");
			
%>		
<BR><BR>
<INPUT TYPE = text name="state_name"> 
<INPUT TYPE = SUBMIT VALUE="Add State">
</FORM>

</body>
</html>
